package com.weiyi.biz.mapper;

import com.weiyi.biz.dto.EquipInfo;
import com.weiyi.biz.dto.WarnCot;
import com.weiyi.biz.dto.WyCountInfo;
import com.weiyi.biz.dto.WyLogInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @version 1.0
 * @ClassName WyManageMapper
 * @Description TODO
 * @Author xiaoq
 * @Date 2020/9/10 16:41
 **/
public interface WyManageMapper {

    /**
    * @Author xiaoq
    * @Description 查询用户绑定传感器数量
    * @Date  2020/9/10
    * @Param [userId]
    * @return java.util.List<com.weiyi.biz.domain.WeiyiEquip>
    **/
    public List<EquipInfo> selectWyEquipByUserId(Long userId);

    public EquipInfo selectWyEquipByCode(String code);



    /**
    * @Author xiaoq
    * @Description 购买位移的所有人员信息
    * @Date  2020/9/10
    * @Param []
    * @return java.util.List<java.lang.Long>
    **/
    public List<Long> selectDistinctUser();



    /**
    * @Author xiaoq
    * @Description 设备日志
    * @Date  2020/9/10
    * @Param [id]
    * @return java.util.List<com.weiyi.biz.domain.WeiyiLog>
    **/
    public List<WyLogInfo> selectWyLogList(@Param("equipId") Long equipId,@Param("startTime") String startTime,@Param("endTime") String endTime);
    //位移统计
    public WyCountInfo selectCount(@Param("equipId") Long equipId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
    * @Author xiaoq
    * @Description 統計預警數量
    * @Date  2020/9/14
    * @Param [warnValue]
    * @return com.weiyi.biz.dto.WarnCot
    **/
    public WarnCot selectWarnCot(Map<String,String> param);

    public WarnCot selectDirection(Long id);



    public String selectUserById(Long id);

    public Long isAdmin(Long id);

}
